package com.ruoyi.controller;

import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.domain.vo.OrderInfoVo;
import com.ruoyi.service.CancelService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author : LeiMingkun
 * @date : 2024-10-26 09:58
 * @description : CancelController
 **/
@Slf4j
@RestController
@RequestMapping("/order")
public class CancelController {
    @Resource
    private CancelService cancelService;
    /**
      * @Param: [orderInfoVo]
      * @Return: com.ruoyi.common.core.web.domain.AjaxResult
      * @Author: LeiMingkun
      * @Date: 2024/10/26 10:07
     * 司机/用户取消订单
     */
    @PostMapping("/cancel")
    public AjaxResult cancel(@RequestBody OrderInfoVo orderInfoVo){
        return cancelService.cancel(orderInfoVo);
    }

}